package com.coffee.sku.api.sku.service;

import com.coffee.core.entity.Page;
import com.coffee.core.entity.PagerInfo;
import com.coffee.core.exception.BusinessException;
import com.coffee.sku.api.sku.query.SkuCategoryQuery;
import com.coffee.sku.api.sku.result.CategoryByAttributeResult;
import com.coffee.sku.api.sku.result.SkuCategoryResult;

import java.util.List;
import java.util.Map;
import java.util.Set;


public interface SkuCategoryService {

	Page<SkuCategoryResult> getPager(SkuCategoryQuery param, PagerInfo pr);

	Page<CategoryByAttributeResult> getPagerByskuAttribute(SkuCategoryQuery param, PagerInfo pr);

	Integer count(SkuCategoryQuery param);
	
	SkuCategoryResult getDetail(Integer id);
	
	List<SkuCategoryResult> getList(SkuCategoryQuery param, PagerInfo pr);
	
	List<SkuCategoryResult> getList(SkuCategoryQuery param);
	
	List<SkuCategoryResult> getList(String isOnlyFirst);

	List<SkuCategoryResult> getListByCity(String isOnlyFirst,Integer cityId);

	void delete(Integer id) throws BusinessException;

	void update(List<SkuCategoryResult> result)throws BusinessException;

	void updateFirstSort(List<Integer> ids)throws BusinessException;

	void add(SkuCategoryResult result)throws BusinessException;

	Map<Integer,SkuCategoryResult> getItemMap(Set<Integer> idSet);
	
	Map<Integer,SkuCategoryResult> getItemMap();
	
}